package com.shawn.example.mvvmdemo.home.net.api

import com.jetpack.mvvm.lib.net.module.HttpApiResult
import com.shawn.example.mvvmdemo.home.model.WxAuthor
import com.shawn.example.mvvmdemo.home.vo.FeedArticleListData
import retrofit2.http.GET
import retrofit2.http.Path

interface WXApiService {
    /**
     * 获取所有的公众号
     */
    @GET("wxarticle/chapters/json")
    suspend fun getWXAuthorList(): HttpApiResult<List<WxAuthor>>

    /**
     * 获取当前公众号某页的数据
     * http://wanandroid.com/wxarticle/list/405/1/json
     *
     * @param id
     * @param page
     * @return 获取当前公众号某页的数据
     */
    @GET("wxarticle/list/{id}/{page}/json")
    suspend fun getWxAuthorArticles(@Path("id") id: Int, @Path("page") page: Int): HttpApiResult<FeedArticleListData>
}